// 导入二次封装axios
import koi from "@/utils/axios.ts";


// 统一管理接口
enum API {
  LIST_PAGE = "/admin/member/member-level/list",
  GET_BY_ID = "/admin/member/member-level/getById",
  UPDATE = "/admin/member/member-level/update",
  ADD = "/admin/member/member-level/add",
  UPDATE_STATE = "/admin/member/member-level/updateStatus"
}
export const listPage = (params: any) => {
  return koi.get(API.LIST_PAGE, params);
};

// 根据ID进行查询
export const getById = (id: any) => {
  return koi.get(API.GET_BY_ID, { id });
};

// 根据ID进行修改
export const update = (data: any) => {
  return koi.post(API.UPDATE, data);
};

// 添加
export const add = (data: any) => {
  return koi.post(API.ADD, data);
};
